function IContainerCustomer(container, item, options) {
  this._container = container;
  this._item = item;
  this._options = options;
  
  this._operator = (options && options.operator) ? options.operator : null;
  this._createElements();
}
IContainerCustomer.prototype._createElements = function() {
  var tr, td, _self = this, unique = MiscUtils.unique();
  this._container.cellPadding = 0;
  this._container.cellSpacing = 0;
  this._container.style.margin = '2px 0';
  this._container.style.backgroundColor = '#faf9f4';
  tr = this._container.insertRow(-1);
  
  td = tr.insertCell(-1);
  td.style.width = '845px';
  td.style.height = '25px';
  td.style.fontSize = '120%';
  td.style.color = '#633e36';
  td.style.fontWeight = 'bold';
  td.style.backgroundImage = 'url(images/common/headline.png)';
  td.style.backgroundRepeat = 'repeat-x';
  td.style.borderRight = 'solid 1px #8F8F8A';
  td.style.borderLeft = 'solid 1px #fff';
  td.align = 'left';
  td.valign = 'middle';
  td.style.paddingLeft = '15px';
  td.appendChild(document.createTextNode('Customer No.'));
  var span = document.createElement('span');
  span.id = unique + '_customerNo_div';
  span.style.marginLeft = '5px';
  span.style.color = 'black';
  td.appendChild(span);
  
  td = tr.insertCell(-1);
  td.style.width = '55px';
  td.style.height = '25px';
  td.className="view";
  td.style.borderRight = 'solid 1px #8F8F8A';
  td.style.borderLeft = 'solid 1px #fff5dd';
  td.style.textAlign = 'center';
  td.style.verticalAlign = 'middle';
  td.style.cursor = 'pointer';
  td.style.fontSize = '120%';
  td.style.color = '#633e36';
  td.style.fontWeight = 'bold';
  td.appendChild(document.createTextNode('View'));
  td.id = unique + '_view_button';
  
  tr = this._container.insertRow(-1);
  td = tr.insertCell(-1);
  td.colSpan = 2;
  td.style.width = '900px';
  td.style.borderLeft = 'solid 1px #ffffff';
  td.style.borderRight = 'solid 1px #bebdba';
  
  tr = this._container.insertRow(-1);
  td = tr.insertCell(-1);
  td.colSpan = 2;
  td.style.width = '900px';
  td.style.height = '10px';
  td.style.borderLeft = 'solid 1px #ffffff';
  td.style.borderRight = 'solid 1px #bebdba';
  
  td.align = 'center';
  itable = document.createElement('table');
  itable.style.width = '870px';
  itable.style.height = '100px';
  itable.cellPadding = 0;
  itable.cellSpacing = 0;
  itable.style.fontSize = '10pt';
  itable.style.color = '#734e52';
  itable.style.fontWeight = 'bold';
  td.appendChild(itable);
  
  itr = itable.insertRow(-1);
  itd = itr.insertCell(-1);
  itd.style.height = '12px';
  
  itr = itable.insertRow(-1);
  itd = itr.insertCell(-1);
  itd.style.width = '60px';
  itd.style.height = '20px';
  
  itd.style.textAlign = 'left';
  itd.style.verticalAlign = 'top';
  itd.appendChild(document.createTextNode('Order'));
  
  itd = itr.insertCell(-1);
  itd.colSpan = 4;
  var otable = document.createElement('table');
  otable.cellPadding = 0;
  otable.cellSpacing = 0;
  otable.style.margin = '0 0 3px 0';
  itd.appendChild(otable);
  
  for (var i = 0, il = this._item.orders.length; i < il; i++) {
    var order = this._item.orders[i];
    otr = otable.insertRow(-1);
    otd = otr.insertCell(-1);
    otd.style.height = '18px';
    itd.style.textAlign = 'left';
    itd.style.verticalAlign = 'top';
    span = document.createElement('span');
    span.style.fontSize = '13px';
    span.style.color = '#000';
    span.style.fontFamily = '';
    span.style.fontWeight = 'bold';
    span.id = unique + '_' + i + '_type_div';
    otd.appendChild(span);
  }
  
  itr = itable.insertRow(-1);
  itd = itr.insertCell(-1);
  itd.style.width = '60px';
  itd.style.height = '20px';
  itd.style.textAlign = 'left';
  itd.appendChild(document.createTextNode('Bride'));
  
  itd = itr.insertCell(-1);
  itd.style.verticalAlign = 'middle';
  itd.style.height = '20px';
  itd.style.width = '275px';
  itd.style.textAlign = 'left';
  itd.style.fontSize = '12px';
  itd.style.color = '#000';
  itd.style.fontFamily = '';
  itd.id = unique + '_brideName_div';
  
  itd = itr.insertCell(-1);
  itd.style.width = '60px';
  itd.style.textAlign = 'left';
  itd.appendChild(document.createTextNode('Groom'));
  
  
  itd = itr.insertCell(-1);
  itd.style.verticalAlign = 'middle';
  itd.style.height = '20px';
  itd.style.width = '200px';
  itd.style.textAlign = 'left';
  itd.style.fontSize = '12px';
  itd.style.color = '#000';
  itd.style.fontFamily = '';
  itd.id = unique + '_groomName_div';
  
  itr = itable.insertRow(-1);
  itd = itr.insertCell(-1);
  itd.style.width = '60px';
  itd.style.height = '20px';
  itd.style.textAlign = 'left';
  itd.appendChild(document.createTextNode('Tel'));
  
  itd = itr.insertCell(-1);
  itd.style.verticalAlign = 'middle';
  itd.style.width = '275px';
  itd.style.textAlign = 'left';
  itd.style.fontSize = '12px';
  itd.style.color = '#000';
  itd.style.fontFamily = '';
  itd.id = unique + '_bridePhone_div';
  
  itd = itr.insertCell(-1);
  itd.style.width = '60px';
  itd.style.height = '20px';
  itd.style.textAlign = 'left';
  itd.appendChild(document.createTextNode('Tel'));
  
  itd = itr.insertCell(-1);
  itd.style.verticalAlign = 'middle';
  itd.style.width = '200px';
  itd.style.textAlign = 'left';
  itd.style.fontSize = '12px';
  itd.style.color = '#000';
  itd.style.fontFamily = '';
  itd.id = unique + '_groomPhone_div';
  
  itr = itable.insertRow(-1);
  itd = itr.insertCell(-1);
  itd.style.width = '60px';
  itd.style.height = '20px';
  itd.style.textAlign = 'left';
  itd.appendChild(document.createTextNode('Mob'));
  
  itd = itr.insertCell(-1);
  itd.style.verticalAlign = 'middle';
  itd.style.width = '275px';
  itd.style.textAlign = 'left';
  itd.style.fontSize = '12px';
  itd.style.color = '#000';
  itd.style.fontFamily = '';
  itd.id = unique + '_brideMobile_div';
 
  itd = itr.insertCell(-1);
  itd.style.width = '60px';
  itd.style.textAlign = 'left';
  itd.appendChild(document.createTextNode('Mob'));
  
  
  itd = itr.insertCell(-1);
  itd.style.width = '200px';
  itd.style.textAlign = 'left';
  itd.style.verticalAlign = 'middle';
  itd.style.fontSize = '12px';
  itd.style.color = '#000';
  itd.style.fontFamily = '';
  itd.id = unique + '_groomMobile_div';
  
  itr = itable.insertRow(-1);
  itd = itr.insertCell(-1);
  itd.colSpan = 4;
  itd = itr.insertCell(-1);
  itd.style.textAlign = 'right';
  itd.style.verticalAlign = 'middle';
  itd.style.height = '20px';
  itd.style.fontSize = '10pt';
  itd.style.color = '#734e52';
  itd.style.fontFamily = 'Arial';
  itd.appendChild(document.createTextNode('Created on'));
  span = document.createElement('span');
  span.style.width = '25px';
  span.style.fontSize = '12px';
  span.style.color = '#000';
  span.style.fontFamily = 'Arial';
  span.style.fontWeight = 'bold';
  span.style.margin = '0 3px';
  span.id = unique + '_date_div';
  itd.appendChild(span);
  itd.appendChild(document.createTextNode('By'));
  span = document.createElement('span');
  span.style.width = '25px';
  span.style.fontSize = '12px';
  span.style.color = '#000';
  span.style.fontFamily = 'Arial';
  span.style.fontWeight = 'bold';
  span.id = unique + '_operator_div';
  span.style.margin = '0 3px';
  itd.appendChild(span);
  
  tr = this._container.insertRow(-1);
  td = tr.insertCell(-1);
  td.colSpan = 2;
  td.style.width = '886px';
  td.style.height = '10px';
  td.style.borderLeft = 'solid 1px #ffffff';
  td.style.borderRight = 'solid 1px #bebdba';
  td.style.borderBottom = 'solid 1px #bebdba';
  
  gui = GuiContainerCustomer.instance(unique, this._item.orders);
  new HandleContainerCustomer(gui, this._item, this._options);
};